#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import get_angle
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    angle = dr.get_angle(id_num=data.id_num)
    rospy.loginfo("get_angle_node: %f" , angle)


def listener():
    rospy.init_node("get_angle", anonymous=True)
    rospy.Subscriber("get_angle", get_angle, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

